<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google 地图</title>
<script src="http://ditu.google.cn/maps?file=api&amp;v=2&amp;key=<?php echo $gg_map_api;?>&hl=zh-CN" type="text/javascript"></script>
 
<style type="text/css">
body{ font-size:13px; line-height:22px;}
#container{position:relative;z-index:1;margin:10px auto;width:960px;overflow:hidden;clear:both;text-align:center;}
</style>
</head>
<body topmargin="0" leftmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="center"><div id="cusMarkTip">请点击下方的图标开始在地图上标注位置</div></td>
  </tr>
  <tr>
    <td align="center"><img src="<?php echo $this->_webroot('googlemaps/ggmap_add_position.jpg'); ?>" onclick="GoogleMap.customMarkPoint();" style="cursor:pointer" ></td>
  </tr>
  <tr>
    <td><div id="GG_map" style="width:100%;height:600px;"></div></td>
  </tr>
</table>

<script type="text/javascript">
var weburl='<?php echo $www_url;?>';
</script>
<script type="text/javascript" src="<?php echo $this->_webroot('googlemaps/googlemap.js'); ?>"></script>
<script>
	var mapcity="";
	var chraddress="";
	if(chraddress==""){
		chraddress=mapcity;
	}
	else{
		if(chraddress.indexOf(mapcity)==-1){
			chraddress =mapcity+chraddress;
		}
		else{
			if(chraddress.indexOf(mapcity.replace("市",""))==-1){
				chraddress =mapcity+chraddress;
			}
		}
	}

	var latitude=<?php echo $position_x;?>;
	var longitude=<?php echo $position_y;?>;

	if(latitude > 0 && longitude > 0)
    {
        GoogleMap.mapMsg =[[latitude,longitude], [chraddress]]; 	   
    }
    else
    {
        GoogleMap.mapMsg =[chraddress, [chraddress]];
    }

    GoogleMap.showLocation(GoogleMap.mapMsg[0]);
</script>
</body>
</html>